using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace HamcoWcs.Entitys.Logs
{
    public class OperationLogConfig : IEntityTypeConfiguration<OperationLog>
    {
        public void Configure(EntityTypeBuilder<OperationLog> builder)
        {
            builder.HasComment("操作日志表");
            builder.Property(x => x.UserName).IsRequired().HasMaxLength(30).HasComment("用户名");
            builder.Property(x => x.Controller).IsRequired().HasMaxLength(30).HasComment("控制器");
            builder.Property(x => x.MethodName).IsRequired().HasMaxLength(30).HasComment("方法");
            builder.Property(x => x.UnitId).HasMaxLength(50).HasComment("条码号");
            builder.Property(x => x.DeviceName).HasMaxLength(30).HasComment("设备名称");
            builder.Property(x => x.Remark).IsRequired().HasColumnType("text").HasComment("具体操作");
        }
    }
}